<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    function jqueryUrl(url){
        //将地址从"？"位置分割成两部分
        var arr = url.split('?');
        //取地址右边参数部分从"&"位置继续分割，成为单独参数列表
        var params = arr[1].split('&'); //得到[a=1,b=2,c=3]
        //定义一个空对象
        var obj = {};
        for(var i=0;i<params.length;i++){
            var param = params[i].split('='); //得到[a,1]、[b,2]、[c,3]
            obj[param[0]] = param[1]; //为对象赋值
        }
        return obj;
    }
    var url = "http://www.baidu.com?a=1&b=2&c=3";
    console.log(jqueryUrl(url));
</script>